package cn.controller;

import cn.entity.Result;
import cn.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("syslog")
public class SysLogController {

    @Autowired
    SysLogService sysLogService;
    @RequestMapping("")
    public ModelAndView index(){
        return new ModelAndView("log/log");
    }
    @RequestMapping("select/{pageNum}/{pageSize}")
    public Result select(@PathVariable("pageNum")int pageNum,@PathVariable("pageSize")int pageSize,String description){
        return new Result(true,"成功",sysLogService.selectPage(pageNum,pageSize,description));
    }
}
